import { request } from '../../request';

// get list by page
export function fetchGetParamByPage(params: Api.Common.CommonSearchParams) {
  return request<Api.System.Param.ParamQueryRecord>({
    url: '/data/param/listByPage',
    method: 'post',
    data: params
  });
}

// delete by id
export function fetchDeleteParamById(id: CommonType.IdType) {
  return request({
    url: '/data/param/deleteById',
    method: 'post',
    params: {
      id
    }
  });
}

// delete batch by ids
export function fetchDeleteParamBatchByIds(ids: CommonType.IdType[]) {
  return request({
    url: '/data/param/deleteBatchByIds',
    method: 'post',
    data: ids
  });
}

// save model
export function fetchParamSave(model: Api.System.Holiday.HolidayFormModel) {
  return request({
    url: '/data/param/save',
    method: 'post',
    data: model
  });
}
